<template>
	<view class="myInquiry-wrap">
		<!-- @click="gotoRouter('/pages-doctor/orderInfo/orderInfo?id='+data.id)" -->
		<view v-for="(item, index) in dataList" :key="index" class="doctor-inquiry-order-wrap">
			<view class="doctor-inquiry-order-item">
				<view class="outer4">
					<image
						src="https://thirdwx.qlogo.cn/mmopen/vi_32/POgEwh4mIHO4nibH0KlMECNjjGxQUq24ZEaGT4poC6icRiccVGKSyXwibcPq4BWmiaIGuG1icwxaQX6grC9VemZoJ8rg/132"
						class="mod4"></image>
					<view class="word4">{{item.patientName}}</view>
					<view class="word5">{{rangeSex[item.sex].text}} &nbsp;&nbsp;{{item.age}}岁</view>
				</view>
				<view class="paragraph1">
					手机号：{{item.phone}}
				</view>
				<view class="outer6">
					<view></view>
					<view style="display: flex;">
						<view @click.stop="gotoRouter('/pages-doctor/patient/recordList?id=' + item.id)"
							class="info3 info3-purple" style="margin-right: 20rpx;">病例</view>
						<view class="info3 info3-purple"
							@click.stop="gotoRouter('/pages-doctor/patient/prescriptionList?id=' + item.id)">
							处方</view>
					</view>
				</view>
			</view>
		</view>
		<u-empty-state v-if="dataList.length == 0" value="暂无数据"></u-empty-state>
	</view>
</template>

<script>
	import uEmptyState from '@/components/u-empty-state/u-empty-state.vue';
	export default {
		components: {
			uEmptyState
		},
		data() {
			return {
				activeTab: 0,
				pageNo: 1,
				pageSize: 20,
				dataTotalPage: 1, //数据总数
				dataLoading: 'loading', //数据加载
				dataList: []
			};
		},
		onLoad(option) {
			this.getList();
		},
		onShow() {},
		methods: {
			//列表
			getList() {
				this.$api
					.patientListOnDoctor({})
					.then(res => {
						if (res.code == 200) {
							this.dataList = res.result
						} else {
							uni.showToast({
								title: res.message,
								icon: 'none'
							});
						}
					});
			},
		}
	};
</script>

<style lang="less">
	.myInquiry-wrap {
		box-sizing: border-box;

		.doctor-inquiry-order-item {
			width: 686rpx;
			border-radius: 16rpx;
			background-color: rgba(255, 255, 255, 1);
			box-shadow: 0px 2rpx 10rpx 0px rgba(0, 0, 0, 0.1);
			box-sizing: border-box;
			padding: 20rpx 30rpx;
			margin: 20rpx 32rpx 0 32rpx;

			.outer4 {
				display: flex;
				align-items: center;
				border-bottom: 1rpx solid #eeeeee;
				padding-bottom: 10rpx;
				margin-bottom: 19rpx;

				.mod4 {
					height: 60rpx;
					border-radius: 50%;
					width: 60rpx;
					display: flex;
					flex-direction: column;
				}

				.word4 {
					color: rgba(51, 51, 51, 1);
					font-size: 28rpx;
					font-family: PingFangSC-Medium;
					margin-left: 16rpx;
				}

				.word5 {
					color: rgba(153, 153, 153, 1);
					font-size: 24rpx;
					font-family: PingFangSC-Regular;
					margin-left: 28rpx;
				}

				.info2 {
					color: rgba(35, 199, 156, 1);
					font-size: 28rpx;
					margin-left: auto;
				}

				.info2-green {
					color: #23c79c;
				}

				.info2-purple {
					color: #6E99C7;
				}

				.info2-gray {
					color: #999999;
				}

				.info2-red {
					color: #FF4141;
				}
			}

			.paragraph1 {
				color: rgba(51, 51, 51, 1);
				font-size: 28rpx;
				font-family: PingFangSC-Regular;
				margin-bottom: 10rpx;
			}

			.outer6 {
				margin-top: 10rpx;
				display: flex;
				align-items: center;
				justify-content: space-between;

				.txt2 {
					color: rgba(153, 153, 153, 1);
					font-size: 28rpx;
					font-family: PingFangSC-Regular;
				}

				.info3 {
					overflow-wrap: break-word;
					color: rgba(255, 65, 65, 1);
					font-size: 22rpx;

				}

				.info3-green {
					color: #23c79c;
					// border: 1rpx solid #23c79c;
					// background: #f7fffd;
				}

				.info3-purple {
					color: #6E99C7;
					border: 1rpx solid #6E99C7;
					background: #F9F7FF;
					width: 140rpx;
					height: 48rpx;
					border-radius: 25rpx;
					justify-content: center;
					align-items: center;
					display: flex;
				}

				.info3-gray {
					color: #999999;
					// border: 1rpx solid #999999;
					// background: #999999;
				}

				.info3-red {
					color: #FF4141;
					// border: 1rpx solid #FF4141;
					// background: #FF4141;
				}
			}
		}
	}
</style>